<?php
// Note: This file is included from the library/Vanilla/Vanilla.Control.SearchForm.php
// class and also from the library/Vanilla/Vanilla.Control.DiscussionForm.php's
// themes/discussions.php include template.

$BlogList .= '
<li id="Blog_'.$DiscussionID.'" class="Blog">
<ul>
   <li class="BlogTitle"> <!--Blog Post Title-->
        <h2>'.$Discussion['Name'].'</h2>
   </li>
   <li class="BlogInfo"> <!--Blog Post Author and Date-->
         <em>by</em><a href="'.GetUrl($this->Context->Configuration, 'account.php', '', 'u', $Discussion['AuthUserID']).'">'.$Discussion['AuthUsername'].'</a>
        <em>on</em>'.date($this->Context->Configuration['BLOG_DATE'], UnixTimestamp($Discussion['DateCreated'])).'
    </li>
    <li class="BlogContent"> <!--Blog Post Content-->
         '.$CommentBody.'
    </li>';

$BlogList .= '<li class="BlogFooter"><div class="BlogMoreInfo">';
if ($Discussion['Closed'] == 0   && $Discussion['CountComments'] == 1) {
       $BlogList .= '<span class="BlogAddComments"><a href="'.GetUrl($this->Context->Configuration, 'comments.php', '', 'DiscussionID', $DiscussionID, '', '#pgbottom', CleanupString($Discussion['Name']).'/').'">'.$this->Context->GetDefinition('AddComments').'</a></span>';
}
        
if ($Discussion['CountComments'] > 1) {
    $Discussion['CountComments']--;
    $BlogList .= '<span class="BlogComments"><a href="'.GetUrl($this->Context->Configuration, 'comments.php', '', 'DiscussionID', $DiscussionID, '', '#Item_2', CleanupString($Discussion['Name']).'/').'">'.$this->Context->GetDefinition('Comments').': '.$Discussion['CountComments'].'</a></span>';
    
}
$BlogList .= '</div>';

$BlogList .= '<div class="BlogBookmarks">';
if ($this->Context->Configuration['BLOG_SOCIALBOOKMARKS_DIGG'] == 1)
    $BlogList .= '<a target="_blank" href="http://digg.com/submit?phase=2&url='.GetUrl($this->Context->Configuration, 'comments.php', '', 'DiscussionID', $DiscussionID, '', '', CleanupString($Discussion['Name']).'/').'&title='.CleanupString($Discussion['Name']).'"><img src="'.$this->Context->Configuration["BASE_URL"].'extensions/Blog/theme/images/digg.gif" /></a>';
if ($this->Context->Configuration['BLOG_SOCIALBOOKMARKS_DELICIOUS'] == 1)
    $BlogList .= '<a target="_blank" href="http://del.icio.us/post?v=4&noui&jump=close&url='.GetUrl($this->Context->Configuration, 'comments.php', '', 'DiscussionID', $DiscussionID, '', '', CleanupString($Discussion['Name']).'/').'&title='.CleanupString($Discussion['Name']).'"><img src="'.$this->Context->Configuration["BASE_URL"].'extensions/Blog/theme/images/delicious.gif" /></a>';
if ($this->Context->Configuration['BLOG_SOCIALBOOKMARKS_STUMBLE'] == 1)
    $BlogList .= '<a href="http://www.stumbleupon.com/newurl.php?url='.GetUrl($this->Context->Configuration, 'comments.php', '', 'DiscussionID', $DiscussionID, '', '', CleanupString($Discussion['Name']).'/').'&rating=1" target="_blank"><img src="'.$this->Context->Configuration["BASE_URL"].'extensions/Blog/theme/images/stumble.gif" /></a>';
if ($this->Context->Configuration['BLOG_SOCIALBOOKMARKS_TECHNORATI'] == 1)
    $BlogList .= '<a href="http://technorati.com/faves?add='.GetUrl($this->Context->Configuration, 'comments.php', '', 'DiscussionID', $DiscussionID, '', '', CleanupString($Discussion['Name']).'/').'&rating=1" target="_blank"><img src="'.$this->Context->Configuration["BASE_URL"].'extensions/Blog/theme/images/technorati.gif" /></a>';
$BlogList .= '</div>';

$BlogList .= '</li>';    
$this->CallDelegate('PostDiscussionOptionsRender');
   
$BlogList .= '</ul>';

?>